﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>AngularJS 模块</title>
    <script type="text/javascript" src="Scripts/angular.js"></script>
</head>
<body>
    <div ng-app="myApp" runoob-directive></div>
    
    <script>

        var app = angular.module("myApp", []);
         
        app.directive("runoobDirective", function () {
            return {
                template: "<H1>我在指令构造器中创建!</H1>"
            };
        });
    </script>

    <!--<div ng-app="myApp" ng-controller="myCtrl">
        {{ firstName + " " + lastName }}
    </div>

    <script src="myApp.js"></script>
    <script src="myCtrl.js"></script>
    myApp.js
    var app = angular.module("myApp", []);
    myCtrl.js
    app.controller("myCtrl", function($scope) {
    $scope.firstName	= "John";
    $scope.lastName= "Doe";
    });-->

</body>
</html>